import request from '@/utils/request'

// 查询友链信息列表
export function listFriendship(query) {
  return request({
    url: '/bk/friendship/list',
    method: 'get',
    params: query
  })
}

// 查询友链信息详细
export function getFriendship(friendshipId) {
  return request({
    url: '/bk/friendship/' + friendshipId,
    method: 'get'
  })
}

// 新增友链信息
export function addFriendship(data) {
  return request({
    url: '/bk/friendship',
    method: 'post',
    data: data
  })
}

// 修改友链信息
export function updateFriendship(data) {
  return request({
    url: '/bk/friendship',
    method: 'put',
    data: data
  })
}

// 删除友链信息
export function delFriendship(friendshipId) {
  return request({
    url: '/bk/friendship/' + friendshipId,
    method: 'delete'
  })
}
